enum toyType {
	none,
	doll_1_png,
	doll_2_png,
	doll_3_png,
	doll_4_png,
	doll_5_png
}

//娃娃类
class Toy extends eui.Image {
	public constructor(type: toyType) {
		super();
		// this.source = RES.getRes("doll_" + < number > type + "_png");
		this.source = RES.getRes("dawa_png");
		this.init(type);
	}

	//初始化
	private init(type: toyType) {
		this.x = 750;
		this.y = 0;
		this.name = this.chooseToyName( < number > type);
	}

	//娃娃名字
	private chooseToyName(type: number) {
		//设置娃娃的名字 后期根据名字来处理和分类
		switch (type) {
			case 1:
				return "doll1";
			case 2:
				return "doll2";
			case 3:
				return "doll3";
			case 4:
				return "doll4";
			case 5:
				return "doll5";
			default:
				return "";
		}

	}
}